#include "notify_presence_task.h"

#include "base/logging.h"
#include "im/adapters/presence_notifier_adapter.h"
#include "im/adapters/bang_robot_adapter.h"

namespace imserver {

void NotifyPresenceTask::run() {
  int res = PresenceNotifierAdapter::Instance().SessionChanged(uid_, session_, session_type_, 2);
  LOG_INFO("NotifyPresenceTask uid=" << uid_ << " sess=" << session_ 
           << " type=" << session_type_ << " res=" << res);

  res = BangRobotAdapter::Instance().DispatchPresence(uid_, session_, session_type_, 2);
  LOG_INFO("BangRobotAdapter DispatchPresence uid=" << uid_ << " sess=" << session_ 
           << " type=" << session_type_ << " res=" << res);
}

}


